package com.example.shirodemo2;

import com.demo.bean.User;
import com.example.shirodemo2.shiro.utils.ShiroUtil;
import com.example.shirodemo2.shiro.bean.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * LoginController
 *
 * @author : SPL
 * @since : 2021-05-10 17:51
 **/
@RestController
@RequestMapping
public class TestController {

    @GetMapping("/test")
    public Object test() {
        User user = ShiroUtil.getCurrentUser();
        return AjaxResult.success(user);
    }

}
